-
Notifications
You must be signed in to change notification settings - Fork 241
Bombcell integration #4306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Julie-Fabre
wants to merge
55
commits into
SpikeInterface:main
Choose a base branch
from
Julie-Fabre:bombcell
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Bombcell integration #4306
+1,955
−154
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…s and add more template metrics
…verlay and histograms
…verlay and histograms
…uration, add amplitude_median, bombcell_snr and fix non-somatic classification rules
for more information, see https://pre-commit.ci
… for name changes
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…ve template and quality metrics (this way it is clear what to input)
for more information, see https://pre-commit.ci
Author
…_metrics in bombcell functions
…n.dump()/json.load() since None serializes directly to JSON null.
for more information, see https://pre-commit.ci
Member
|
Thanks Julie for this plot this is really cool. lets have a call to discuss no ? |
Author
for more information, see https://pre-commit.ci
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



This PR ports bombcell-style unit classification to SpikeInterface.
Template metrics
get_trough_and_peak_idx()function that usesscipy.signal.find_peaks(). Since SpikeInterface stores templates based on raw data rather than the heavily smoothed templates used in template matching, the waveforms can be noisy—so you can optionally apply Savitzky-Golay smoothing before detection. The function returns dicts for troughs, peaks before, and peaks after, each containing indices, values, prominences, and widths.New metrics:
peak_before_to_trough_ratio,peak_after_to_trough_ratio,waveform_baseline_flatness,peak_before_width,trough_width,main_peak_to_trough_ratio.Renamed
peak_to_valleytopeak_to_trough_duration.Quality metrics
snr_bombcell—peak amplitude over baseline MAD.amplitude_cutoffnow has parameters for controlling the histogram fitting:Unit classification
spikeinterface.curation:Units get classified as NOISE → MUA → GOOD based on successive threshold checks. Optional NON_SOMA category for non-somatic waveforms.
Plots
or a wrapper for all plots:
TODO: